﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Security;
using Business.Dal;
using Business.Entity;

namespace Sahibinden
{
    public partial class Test : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Page.User.Identity.IsAuthenticated)
            {
                pnlLogin.Visible = false;
                pnlSignOut.Visible = true;

            }

            else
            {
                pnlLogin.Visible = true;
                pnlSignOut.Visible = false;
            
            }

        }

        protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
        {
            Business.Dal.UyeProvider uye = new Business.Dal.UyeProvider();
            int UyeID = uye.Login(txtAdi.Text, txtSifre.Text);
            
        }

        protected void ImageButton2_Click(object sender, ImageClickEventArgs e)
        {
            FormsAuthentication.SignOut();
            Response.Redirect("../Default.aspx");
        }
        
    }
}
